package com.xiaozhen.app.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaozhen.app.service.SysAppService;
import com.xiaozhen.security.controller.BaseController;
import com.xiaozhen.common.core.domain.AjaxResult;
import com.xiaozhen.common.core.domain.app.SysApp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * HISTORY
 *
 * @author zhenweisheng
 * @date 2021/9/26 17:05
 * @description:
 */
@RestController
@Api(tags = "应用管理的接口")
@RequestMapping("/sysApp")
public class SysAppController extends BaseController {

    @Autowired
    private SysAppService sysAppService;


    @ApiOperation("获取所有应用列表")
    @GetMapping("/list")
    public AjaxResult list() {
        Page<SysApp> page = startPage();
        Page<SysApp> list = sysAppService.selectAppList(page);
        return getDataTable(list);
    }


}
